 |
|
 |
Subject: LotusScript: list top 5 users - sorting multi-dimensional array |
 |
 |
 |
Product Area: Notes Client |
 |
Technical Area: Application Development |
 |
Platform: Windows |
 |
Release: 8.5.1 |
 |
Reproducible: Not applicable |
 |
 |
 |
 |
Hi folks,
I'm working with a set of log documents that show user activity over a period of time. I'm creating a report on this data over 1 week, 1 month and 3 month intervals. I have been asked to provide the top 5 users of the application during each of those periods. I already have a loop that is going through the results set for something else, so I'm adding this to that... but my problem is, how am I going to sort the arrays?
I am thinking of setting up a dynamic multidimensional array that has the person's name as the first element, and their running total as the second. For each log doc, I'll either add to the total of someone in the array or add them to the array. But at the end of the loop, how do I sort the whole thing together? If I can do that, writing just the first 5 entries in the array to the field is easy. It has been about a hundred years since I've had to do anything like this and I need a refresher!
I've done quite a bit of searching in this forum and in the 6 and 7 forum and haven't found anything helpful yet.
Thanks for reading.
 
Feedback number WEBB8YYLEG created by ~Umberto Quetwegenoopsi on 10/11/2012

Status: Open
Comments:

LotusScript: list top 5 users - sor... (~Umberto Quetwe... 11.Oct.12)
. . Sorting routines are available (~Martha Lopjipy... 11.Oct.12)
. . . . I may have found it but this is anc... (~Umberto Quetwe... 11.Oct.12)
. . . . . . DO NOT USE THAT CODE! (~Kim Quetnulyle... 12.Oct.12)
. . . . . . . . Here are some LS sort routines (~Fred Xanjumima... 12.Oct.12)
. . . . . . . . . . GREAT info, thanks (~Martha Lopjipy... 12.Oct.12)
. . . . . . . . . . Thanks, Willie!! (~Umberto Quetwe... 12.Oct.12)
. . . . . . . . . . Sorry...slight correction to one li... (~Fred Xanjumima... 12.Oct.12)
. . . . . . . . . . HELP, WILLY! I am stuck! (~Umberto Quetwe... 19.Oct.12)
. . . . . . . . . . . . The code sorts arrays...not lists. (~Fred Xanjumima... 19.Oct.12)
. . . . . . . . . . . . . . It is working! (~Umberto Quetwe... 19.Oct.12)
. . . . . . . . . . . . . . . . Glad you got it working. (~Fred Xanjumima... 19.Oct.12)
. . Just use a list instead (~Delores Zekree... 11.Oct.12)
. . . . I have never seen this! (~Umberto Quetwe... 11.Oct.12)
. . . . . . good for you (~Delores Zekree... 11.Oct.12)
. . . . . . . . Please post it! (~Umberto Quetwe... 11.Oct.12)
. . . . . . . . . . IsElement() (~Dan Kikiterobu... 12.Oct.12)
. . . . . . . . . . Just use @Sort... (~Tip Opjipymanl... 11.Oct.12)
. . . . . . . . . . . . The beauty of simplicity! (~Umberto Quetwe... 11.Oct.12)
. . . . . . . . . . . . . . If it just has to work then don't u... (~Fred Xanjumima... 12.Oct.12)
. . . . . . . . . . . . . . . . She only has to sort 5 values... (~Tip Opjipymanl... 13.Oct.12)
. . . . . . . . . . . . . . . . . . I have to sort more than 5 (~Umberto Quetwe... 16.Oct.12) |
|  |
|